<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>标题：<span class="s1"></span></h1>
账号：<input type="text" id="i1">
密码：<input type="text" id="i2">
<button onclick="f1()">点我</button>
<script>
    function f1(){
        var inputE1 = document.querySelector('#i1');
        var value = inputE1.value;
        console.log(value,typeof value)
        console.log(parseFloat(value))
    }

    var inputE2 = document.getElementById('#i2');
    var span1 = document.querySelector('.s1');
    span1.innerHTML='我是标题';

</script>
</body>
</html>